# Contributor: Olliver Schinagl <oliver@schinagl.nl>
# Maintainer: Olliver Schinagl <oliver@schinagl.nl>
pkgname=ibmswtpm2
pkgver=1661
pkgrel=1
pkgdesc="Software implementation of the TCG TPM 2.0 specification by IBM"
url="http://ibmswtpm.sourceforge.net/ibmswtpm2.html"
arch="all"
license="MIT"
makedepends="musl-dev openssl1.1-compat-dev"
options="!check"  # No selftest available
source="https://downloads.sourceforge.net/project/ibmswtpm2/ibmtpm$pkgver.tar.gz
	riscv64.patch"
builddir="$srcdir/src"

build() {
	make
}

package() {
	install -D -m 0655 -t "$pkgdir/usr/bin" \
	        "$builddir/tpm_server"
}

sha512sums="
942baa26311472d6af6b2c3b3b4132718e5e2b1eaa7decb0f64d910cbb7acaa4814ac95b18b5f2a4ea43990978cd5577b8fd50b158a055ff475710ad2426f6cb  ibmtpm1661.tar.gz
52f0416909c89b46fefba50523e0360fb86661eeb58069276b3cfa2c500d3bf5eb5ef5efea6528da8e2f9638d3a9b75e3c414320f239d72993dd5fa3472e8710  riscv64.patch
"
